import request from '@/utils/request'

// 查询练习列表
export function listRandomPractice(query) {
  return request({
    url: '/exam/randomPractice/list',
    method: 'get',
    params: query
  })
}

// 查询练习所有列表
export function listAllRandomPractice(query) {
  return request({
    url: '/exam/randomPractice/listAll',
    method: 'get',
    params: query
  })
}

// 查询练习详细
export function getRandomPractice(practiceId) {
  return request({
    url: '/exam/randomPractice/getInfo/' + practiceId,
    method: 'get'
  })
}

// 新增练习
export function addRandomPractice(data) {
  return request({
    url: '/exam/randomPractice/add',
    method: 'post',
    data: data
  })
}

// 修改练习
export function updateRandomPractice(data) {
  return request({
    url: '/exam/randomPractice/edit',
    method: 'post',
    data: data
  })
}

// 删除练习
export function delRandomPractice(practiceId) {
  return request({
    url: '/exam/randomPractice/remove/' + practiceId,
    method: 'get'
  })
}
